From 0628b9e2372381b5a446b8b2d08631c9842b406c Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Wed, 27 May 2020 14:37:09 -0600 Subject: [PATCH] clang-tidy readability-isolate-declaration on gui. --- gui/gmapdlg.cc | 3 ++- gui/mainwindow.cc | 3 ++- gui/serial_unix.cc | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gui/gmapdlg.cc b/gui/gmapdlg.cc index ea44ad1e2..5aaf83db1 100644 --- a/gui/gmapdlg.cc +++ b/gui/gmapdlg.cc @@ -95,7 +95,8 @@ void GMapDialog::appendWaypointInfo(QStandardItem* it, const GpxWaypoint& wpt) //------------------------------------------------------------------------ void GMapDialog::appendTrackInfo(QStandardItem* it, const GpxTrack& trk) { - QDateTime startTime, stopTime; + QDateTime startTime; + QDateTime stopTime; bool first = true; int count = 0; foreach (const GpxTrackSegment& seg, trk.getTrackSegments()) { diff --git a/gui/mainwindow.cc b/gui/mainwindow.cc index 3e88c8a3c..22b2b449c 100644 --- a/gui/mainwindow.cc +++ b/gui/mainwindow.cc @@ -1043,7 +1043,8 @@ void MainWindow::applyActionX() ui_.outputWindow->clear(); ui_.outputWindow->appendPlainText("gpsbabel " + args.join(" ")); - QString errorString, outputString; + QString errorString; + QString outputString; QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); bool x = runGpsbabel(args, errorString, outputString); QApplication::restoreOverrideCursor(); diff --git a/gui/serial_unix.cc b/gui/serial_unix.cc index 47f39db8e..73b7f2cbb 100644 --- a/gui/serial_unix.cc +++ b/gui/serial_unix.cc @@ -43,7 +43,8 @@ static QStringList dynamicDevices() const char* path = udev_list_entry_get_name(device); struct udev_device* dev = udev_device_new_from_syspath(udev, path); - bool okMaj, okMin; + bool okMaj; + bool okMin; int major = QString(udev_device_get_property_value(dev, "MAJOR")).toInt(&okMaj); int minor = QString(udev_device_get_property_value(dev, "MINOR")).toInt(&okMin); if (!okMaj || !okMin) { -- 2.30.2